package ch02.graphics;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class NameViewer 
{
	
	public static void main(String[] args)
	{		
		String name = JOptionPane.showInputDialog("What's your name bro?");
		
		JFrame frame = new JFrame();
		frame.setSize(300, 400);
		frame.setTitle("Yay fool, that's you name:");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		NameComponent nameComponent = new NameComponent(name);
		frame.add(nameComponent);
		
		frame.setVisible(true);
	}

}
